﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Problema1
{
    public abstract class masina
    {
        protected string culoare;
        protected enum tipTransmisie{AUTO,MANUALA,HIDRAMATA};
        protected tipTransmisie transmisie;
        protected masina()
        {
            Console.Write("Culoarea masina : ");
            culoare = Console.ReadLine();
            Console.Write("Tip transmisie : \r\n  1.Automata\r\n  2.Manuala\r\n  3.Hidramata\r\n");
            int t = 0;
            while (t < 1 || t > 3)
                t = Convert.ToInt32(Console.ReadLine());
            switch (t)
            {
                case 1: transmisie = tipTransmisie.AUTO; break;
                case 2: transmisie = tipTransmisie.MANUALA; break;
                case 3: transmisie = tipTransmisie.HIDRAMATA; break;
                default: Console.WriteLine("Eroare inexplicabila !!!!"); Environment.Exit(1); break;
            };
        }
        virtual public void printData()
        {
            Console.Write("    Culoare : " + culoare + "\r\n    Tip transmisie :" + transmisie.ToString() + "\r\n");
        }
    }
}
